import 'dart:convert';

import 'package:flutter2/generated/json/base/json_field.dart';
import 'package:flutter2/generated/json/repay_entity.g.dart';

export 'package:flutter2/generated/json/repay_entity.g.dart';

@JsonSerializable()
class RepayEntity {
  @JSONField(name: "wouldskiearly")
  List<RepayPlanEntity> plans = [];

  RepayEntity();

  factory RepayEntity.fromJson(Map<String, dynamic> json) => $RepayEntityFromJson(json);

  Map<String, dynamic> toJson() => $RepayEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class RepayPlanEntity {
  @JSONField(name: "biography")
  int status = 0;
  @JSONField(name: "need")
  int repay = 0;
  @JSONField(name: "leteastwardscreature")
  int cur = 0;
  @JSONField(name: "weddingdelicatebye")
  int loan = 0;
  @JSONField(name: "embarrassnetwork")
  int id = 0;
  @JSONField(name: "uniquepardonappear")
  int overDays = 0;
  @JSONField(name: "mrscruel")
  double interest = 0;
  @JSONField(name: "transparent")
  int late = 0;
  @JSONField(name: "fourthbreathdeaf")
  int service = 0;
  @JSONField(name: "africarequestdictionarycentre")
  String repayTime = '';

  RepayPlanEntity();

  factory RepayPlanEntity.fromJson(Map<String, dynamic> json) => $RepayPlanEntityFromJson(json);

  Map<String, dynamic> toJson() => $RepayPlanEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
